<?php


namespace App\Http\Controllers\Admin;


use App\Http\Controllers\Controller;
use App\Models\OilPrice;


class OilPriceController extends Controller
{
    public $model;
    public function __construct()
    {
        $this->model = new OilPrice();
    }

    /**
     * 后台更新数据
     * @return \Illuminate\Http\JsonResponse
     */
    public function adminUpdateOilPrice()
    {
        $test = '你好3'."<br>";
        $path = base_path().'/log/cron.txt';

        file_put_contents($path,$test,FILE_APPEND);//把字符串内容存储到web.php中。
        $result = app('resultJson');
        return response()->json($result->setData($this->model->adminUpdateOilPrice()));
    }
}